import Vue from 'vue'
import VueRouter from 'vue-router'

import Login from '../views/login.vue'
import Main from '../views/main.vue'

import Map from '../views/Map.vue'

// import ParkAdd from '../views/ParkAdd.vue'

// 高德地图
import GaodeMapTwo from '../views/GaodeMapTwo.vue'

import GaodeMap from '../views/GaodeMap.vue'



import Staff from '../views/Staff.vue'
import StaffLog from '../views/StaffLog.vue'

import Logintwo from '../views/login/Logintwo.vue'
import UserAdd from '../views/UserAdd.vue'
import OrdersInfo from '../views/myorders/ordersInfo.vue'
import OrdersLog from '../views/myorders/ordersLog.vue'
import Contract from '../views/Contract.vue'
import ContractLog from '../views/ContractLog.vue'
import ContractSign from '../views/ContractSign.vue'

import Finance from '../views/finance/Finance.vue'

import Financeinandout from '../views/finance/Financeinandout.vue'
import User from '../views/User.vue'
import UserPay from '../views/UserPay.vue'

import UserPayAdd from '../views/UserPayAdd.vue'
import Rule from '../views/riskmanage/Rule.vue'
import Log from '../views/riskmanage/Log.vue'
import RuleAdd from '../views/riskmanage/RuleAdd.vue'

import normalReminder from '../views/afterLoan/normalReminder.vue'
import overdueCollection from '../views/afterLoan/overdueCollection.vue'
import repaymentDetails from '../views/afterLoan/repaymentDetails.vue'




import BaiduMap from 'vue-baidu-map'

Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'CxSQUdh44mEG3ZVOTvemBIbfdU3hnu4S'
})

Vue.use(VueRouter)

const routes = [

  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/financeinandout',
        name:'Financeinandout',
        component:Financeinandout

      }
    ]
  },

  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/finance',
        name:'Finance',
        component:Finance

      }
    ]
  },
 
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/userAdd',
        name:'UserAdd',
        component:UserAdd

      }
    ]
  },
 
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/staffLog',
        name:'StaffLog',
        component:StaffLog

      }
    ]
  },
 
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/gaodeMapTwo',
        name:'GaodeMapTwo',
        component:GaodeMapTwo

      }
    ]
  },
 //订单列表
 {
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/OrdersInfo',
      name:'OrdersInfo',
      component:OrdersInfo

    }
  ]
},
//订单日志
{
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/OrdersLog',
      name:'OrdersLog',
      component:OrdersLog

    }
  ]
}, 

  
 //风控规则列表
 {
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/Rule',
      name:'Rule',
      component:Rule

    }
  ]
},
//风控日志
{
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/Log',
      name:'Log',
      component:Log

    }
  ]
}, 
{
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/RuleAdd',
      name:'RuleAdd',
      component:RuleAdd

    }
  ]
}, 
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/map',
        name:'Map',
        component:Map

      }
    ]
  },
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/staff',
        name:'Staff',
        component:Staff

      },

      {
        path: '/user',
        name: 'User',
        component:User
      },{
        path: '/userPay',
        name: 'UserPay',
        component:UserPay
      },{
        path: '/userPayAdd',
        name: 'UserPayAdd',
        component:UserPayAdd
      }
    ]
  },
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/contract',
        name:'Contract',
        component:Contract
      }
    ]
  },
//合同日志
{
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/contractLog',
      name:'ContractLog',
      component:ContractLog

    }
  ]
},
{
  path: '/main',
  name: 'Main',
  component: Main,
  children:[
    {
      path:'/contractsign',
      name:'ContractSign',
      component:ContractSign

    }
  ]
},
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children:[
      {
        path:'/normalReminder',
        name:'normalReminder',
        component:normalReminder
      },
      {
        path: '/overdueCollection',
        name: 'overdueCollection',
        component:overdueCollection
      },{
        path: '/repaymentDetails',
        name: 'repaymentDetails',
        component:repaymentDetails
      }
    ]
  },
 
  {
    path: '/gaodeMap',
    name: 'GaodeMap',
    component:GaodeMap
  },
  
  {
    path: '/map',
    name: 'Map',
    component: Map
  },
  
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/logintwo',
    name: 'Logintwo',
    component: Logintwo
  },
  {
    path: '/',
    name: 'Logintwo',
    component: Logintwo
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
